package com.example.restaurant.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.restaurant.controller.form.AddPersonForm;
import com.example.restaurant.controller.form.AddUserForm;
import com.example.restaurant.controller.form.PutStorePersonNameForm;
import com.example.restaurant.model.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.restaurant.service.dto.GetStoreNameDto;

import java.util.List;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author x
 * @since 2022-09-29
 */
public interface UserService extends IService<User> {


    //账号重复验证
    boolean checkUsername(String username);

    //用户注册
    boolean addUser(AddUserForm addUserForm);

    //用户登录
    User doLogin(String username, String password);

    //获取用户员工
    List<User> getPerson(int userId, String username);

    //根据门店id和店长名查询
     IPage<GetStoreNameDto> getStoreName(int storeId, String username,int current,int size);

    //添加员工
    boolean addPerson(AddPersonForm addPersonForm);
    //修改店长信息
   boolean putStorePersonName(PutStorePersonNameForm putStorePersonNameForm);

   //删除店长
    boolean delPersonById(int id);
}
